//
//  PayAdvisoryResultView.swift
//  EyeVisionForPatients
//
//  Created by PMC on 2020/2/28.
//  Copyright © 2020 tao Tao. All rights reserved.
//

import UIKit

class PayAdvisoryResultView: UIView {
    
    weak var delegate: PayResultProtocol?

    @IBOutlet private weak var advisoryBtn: UIButton! {
        didSet {
            advisoryBtn.setBackgroundImage(UIImage(color: .mainColor), for: .normal)
            advisoryBtn.setBackgroundImage(UIImage(color: .mainGray), for: .highlighted)
            advisoryBtn.layer.cornerRadius = advisoryBtn.height * 0.5
            advisoryBtn.layer.masksToBounds = true
        }
    }
    
    @IBAction private func advisoryAction(_ sender: UIButton) {
        if let delegate = delegate,
            delegate.responds(to: #selector(delegate.advisoryNow(_:))) {
            delegate.advisoryNow!(self)
        }
    }
}
